---
layout: homePage
title: Dewdz's blog
---

{% for post in paginator.posts %}
  <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
  <p><a href="{{ post.url }}">{{ post.excerpt }}</a></p>
  <p class="post-info">
    <span>{{ post.date }}</span>
    <span class="margin-left-20">分类：{{ post.categories }}</span>
    {% if post.tags %}
        <span class="margin-left-20">标签：
            {% for tag in post.tags %}
                {{ tag | append:'&nbsp;' }}
            {% endfor %}
        </span>
    {% endif %}
  </p>
{% endfor %}

{% if paginator.total_pages > 1 %}
  <div class="pagination">
    {% if paginator.previous_page %}
      <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; 上一页</a>
    {% else %}
      <span>&laquo; 上一页</span>
    {% endif %}

    {% for page in (1..paginator.total_pages) %}
      {% if page == paginator.page %}
        <em>{{ page }}</em>
      {% elsif page == 1 %}
        <a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
      {% else %}
        <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
      {% endif %}
    {% endfor %}

    {% if paginator.next_page %}
      <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">下一页 &raquo;</a>
    {% else %}
      <span>下一页 &raquo;</span>
    {% endif %}
  </div>
{% endif %}
